from base import Base
from selenium.webdriver.common.by import By

class Page1(Base):
    #我的
    def test_my(self):
        loc=(By.ID,'com.kongfz.app:id/lav_5')
        ele=self.self_ele(loc)
        return ele
    def test_name(self):
        loc=(By.XPATH,'//android.widget.EditText[@resource-id="com.kongfz.app:id/et_login_name"]')
        ele=self.self_ele(loc)
        return ele
    def test_pwd(self):
        loc=(By.XPATH,'//android.widget.EditText[@resource-id="com.kongfz.app:id/et_pwd"]')
        ele=self.self_ele(loc)
        return ele
    def test_pr(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/iconf_privacy"]')
        ele=self.self_ele(loc)
        return ele
    def test_btn(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tv_confirm_btn"]')
        ele=self.self_ele(loc)
        return ele
    #点击关注
    def test_an(self):
        loc=(By.XPATH,'//android.widget.RelativeLayout[@resource-id="com.kongfz.app:id/rl_nav2"]')
        ele=self.self_ele(loc)
        return ele
    #断言
    def test_guanzhu(self):
        loc=(By.XPATH,'(//android.widget.TextView[@text="关注"])[1]')
        ele=self.self_ele(loc)
        return ele